package day1803;

public class lanhanshi {
    private lanhanshi(){
    }

    static private lanhanshi a ;

    synchronized public static lanhanshi getlan(){//什么时候需要，什么时候再new//延时加载的思想
         //有安全隐患，用锁锁起来
            if(a==null)
                a = new lanhanshi();//有安全隐患
            return a;
        }
}
